package net.csdn.business.common.feign.oauth2.config;

import feign.Logger;
import feign.codec.ErrorDecoder;
import net.csdn.business.common.feign.decoder.AuthFeignErrorDecoder;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Profile;

/**
 * @Desc:
 * @ClassName: AuthFeignConfiguration
 * @Author: zhangyl
 * @Date: 2023/2/1 17:57
 */
public class AuthFeignConfiguration {
    @Bean
    @Profile(value = {"dev", "test", "pre"})
    public Logger.Level logLevel() {
        return Logger.Level.FULL;
    }

    @Bean
    public ErrorDecoder decoder() {
        return new AuthFeignErrorDecoder();
    }

}